package ltd.jdsoft.cute.channel.exception;

import ltd.jdsoft.cute.spring.web.exception.ExceptionEnum;

/**
 * 通道异常枚举定义，code从1100开始
 * 
 * @author zhengzhq
 *
 */
public enum ChannelExceptionEnum implements ExceptionEnum {

  UN_RECOGNIZED_COOPERATOR(1100, "未识别的合作方标识"),
  IP_DEFIED(1105, "IP访问受限"),
  SIGN_ERROR(1110, "签名不一致"),
  REQ_MSGID_CANNOT_EMPTY(1115, "流水号不能为空"),
  ORG_DISABLED(1120, "接入方已经被禁用"),
  NOT_AVAILABLE_CHANNEL(1125, "暂无可用通道"),
  CHANNEL_NOT_ACTIVED(1130, "通道未激活，访问受限"),
  ALGORITHM_CANNOT_EMPTY(1135, "加密算法不能为空"),
  CHANNEL_NOT_SUPPORT(1140, "当前通道不支持该业务，需要重试");

  private int code;
  private String message;

  private ChannelExceptionEnum(int code, String message) {
    this.code = code;
    this.message = message;
  }

  @Override
  public int getCode() {
    return code;
  }

  @Override
  public String getMessage() {
    return message;
  }
}
